package base

import (
	"MoSkeleton/framework/core/consts"
	"MoSkeleton/framework/utils"
	"MoSkeleton/web/pogos/request/monitor"
	"github.com/gin-gonic/gin"
)

type BaseCtrl struct {
}

func (b *BaseCtrl) IgnoreLogResponseData(c *gin.Context) {
	var operLog4GinReq *monitor.OperLog4GinReq
	utils.GinGet(c, consts.GinContext_OperLog_key, &operLog4GinReq)
	if operLog4GinReq == nil {
		return
	}
	operLog4GinReq.SaveResponseData = false
}

func (b *BaseCtrl) IgnoreLogRequestData(c *gin.Context) {
	var operLog4GinReq *monitor.OperLog4GinReq
	utils.GinGet(c, consts.GinContext_OperLog_key, operLog4GinReq)
	if operLog4GinReq == nil {
		return
	}
	operLog4GinReq.SaveRequestData = false
}
